//创建二维数组,并分别求每个一维数组的和以及总和
public class A18{
	public static void main(String[] args){
		int[][] yearArrArr = {
			{22,66,44},
			{77,33,88},
			{25,45,65},
			{11,66,99}
		};
		int sum = 0;
		for(int i = 0;i < yearArrArr.length;i++){
			int quarterSum = getQuarterSum(yearArrArr[i]);
			System.out.println("第"+(i+1)+"季度的和为:" + quarterSum);
			sum = sum + quarterSum;
		}
		System.out.println("全年的和为:" + sum);
	}
	public static int getQuarterSum(int[] arr){
		int sum = 0;
		for(int i = 0;i < arr.length;i++){
			sum = sum + arr[i];
		}
		return sum;
	}

}




